import psutil
import datetime
from  subprocess import PIPE
from IPy import IP
# mem = psutil.virtual_memory() #内存情况
# print(mem.total/1024**3,mem.used/1024**3,mem.free/1024**3)
# cpu = psutil.cpu_times(percpu=True)
# print(psutil.cpu_times().user)
# print(psutil.cpu_count())  #cpu逻辑个数  logical 默认为True
# print(psutil.cpu_count(logical=False)) #cpu物理个数
# print(psutil.swap_memory())
# print(psutil.disk_partitions()) #整个磁盘
# print(psutil.disk_usage('C:\\')) #某个分区
# print(psutil.disk_io_counters()) #硬盘的总IO个数，读写信息
# print(psutil.net_io_counters())  #所有网卡信息
# print(psutil.net_io_counters(pernic=True))  #显示每个网卡信息
# print(psutil.users())
# print(psutil.boot_time()) #显示系统开机时间
# print(datetime.datetime.fromtimestamp(psutil.boot_time()).strftime("%Y-%m-%d %H:%M:%S")) #将时间格式化
# print(psutil.pids())
# p = psutil.Process(6668) #实例化一个Process对象，参数为一个进程的PID
# print(p.name())
# print(p.exe())
# print(p.cwd())
# print(p.status())
# print(p.create_time()) #创建进程时间戳
# print(p.num_threads())

# p = psutil.Popen(['python','-c',"print('hello')"],stdout=PIPE)
# print(p.name())
# print(p.username())
# print(p.communicate())   #输出命令结果

import pycurl
print(pycurl.version)
url = 'www.114site.com'
c = pycurl.Curl()
c.setopt(pycurl.URL,url)

